package com.ysz.service.impl;

import com.ysz.annotation.Mark;
import com.ysz.mapper.TestCRUDMapper;
import com.ysz.pojo.CRUDPojo;
import com.ysz.service.TestAutoAdd;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @ClassName TestAutoAddImpl
 * @Description TODO
 * @Data 13:10
 * @Version 1.0
 * @Author ysz
 */
@Service
public class TestAutoAddImpl implements TestAutoAdd {
    @Autowired
    private TestCRUDMapper testCRUDMapper;

    @Override
    @Mark(createByMapping = "create_by",
            createTimeMapping = "create_time",
            index = 0,
            updateByMapping = "update_by",
            updateTimeMapping = "update_time")
    public int add(CRUDPojo crudPojo) {
        return testCRUDMapper.insertRecording(null, crudPojo);
    }
}
